package com.tjetc.controller;
import com.tjetc.domain.District;
import com.tjetc.service.DistrictService;
import com.tjetc.service.impl.DistrictServiceImpl;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
* (district)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/district")
public class DistrictController {
/**
* 服务对象
*/
@Resource
private DistrictService districtService;

/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping("selectOne")
public District selectOne(Integer id) {
return districtService.selectByPrimaryKey(id);
}

@RequestMapping("selBeijing")
    public List<District> selBeijing(){
    return districtService.selBeijing();
}

}
